/**
 * 
 */
package com.sci.web.daoimpl;

import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sci.web.bean.Enterprise_Attachment;

/**
 * @author  BaiFuyou
 * @date: Nov 8, 2011 11:52:45 AM
 */
public class DateReportM_Enterprise_AttachmentDao extends SqlMapClientDaoSupport implements com.sci.web.dao.DateReportM_Enterprise_AttachmentDao {

	/* (non-Javadoc)
	 * @see com.sci.web.dao.DateReportM_Enterprise_AttachmentDao#getEnterprise_AttachmentByUid(int)
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<Enterprise_Attachment> getEnterprise_AttachmentByUid(int uid) {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().queryForList("datereportseason.getallEnterprise_AttachmentByUid",uid);
	}

	@Override
	public boolean deleteOneEnterprise_AttachmentById(Map<String, Object> map) {
		// TODO Auto-generated method stub  deleteoneEnterprise_Attachmentbyid
		return (Integer)super.getSqlMapClientTemplate().delete("datereportseason.deleteoneEnterprise_Attachmentbyid",map)>0?true:false;
	}

	@Override
	public int getEnterprsieIdByUid(int uid) {
		// TODO Auto-generated method sub
		return (Integer)super.getSqlMapClientTemplate().queryForObject("datereportseason.getenid",uid);
	}

	@Override
	public boolean insertNewEnterprise_Attachmen(Enterprise_Attachment ea) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().insert("datereportseason.insertnewEnterprise_Attachment",ea)>0?true:false;
	}

}
